package mlz.d_thread;

/*
    实现Runnable接口
 */
public class MyRunnable implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            //获取当前线程
            Thread t = Thread.currentThread();
            //获取线程名字
            System.out.println(t.getName() + ":" + i);
        }
    }
}







